package com.wc.codeforces.DP.线性DP.Test_of_Love;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/7/18 15:33
 * @description https://codeforces.com/problemset/problem/1992/D
 */
public class Main {
    /**
     * 思路：线性DP, 和跳台阶是一样的, 当前位置可以从哪里来, 又会到哪里去
     * 题意：到达n + 1穿过最少的河
     * f[i] 表示到达 i 位置经过最少的河段
     * 转移方程：
     * s[i] == 'W', f[i + 1] = Math.min(f[i] + 1, f[i + 1]), 水中只能走一步
     * s[i] == 'C', f[i] = INF
     * s[i] != 'W' && s[i] != 'C', f[j] = min(f[j], f[i]), j 表示可以从 i 跳跃的位置, j ∈ [i + 1, min(i + m, n + 1)]
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 200010;
    static int[] f = new int[N];
    static char[] s = new char[N];
    static int n, m, k;

    public static void main(String[] args) {
        int T = sc.nextInt();
        while (T-- > 0) {
            n = sc.nextInt();
            m = sc.nextInt();
            k = sc.nextInt();
            Arrays.fill(f, 0, n + 2, N);
            s = (" " + sc.next()).toCharArray();
            f[0] = 0;
            for (int i = 0; i <= n; i++) {
                if (s[i] == 'C') continue;
                if (s[i] == 'W') {
                    f[i + 1] = Math.min(f[i] + 1, f[i + 1]);
                    continue;
                }
                for (int j = i + 1; j <= i + m && j <= n + 1; j++) {
                    f[j] = Math.min(f[j], f[i]);
                }
            }
            if (f[n + 1] <= k) out.println("YES");
            else out.println("NO");
        }
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
